import java.util.Scanner;
public class Task {
    public static void main(String[] args) {
        System.out.println("Введите строку");
Scanner s = new Scanner(System.in).useDelimiter("\n"); 
StringBuffer task = new StringBuffer(s.next());
task.reverse(); 
System.out.println (task); 
    }
}
